package assignment3;

public class Rectangle {
	public Rectangle(double length, double width){
		this.length = length;
		this.width = width;
	}
	public double GetLength() {
		return length;
	}
	public double GetWidth() {
		return width;
	}
	public void Show() {
		if(length == width) {
			System.out.print("边长为" + length + "的正方形");
		}
		else {
			System.out.print("长为"+length+"宽为"+width+"的长方形");			
		}
	}
	private double length;
	private double width;
}